package Model;

import Model.Enum.Gender;

/**
 * Created with IntelliJ IDEA.
 * User: Женя
 * Date: 03.11.13
 * Time: 19:19
 * To change this template use File | Settings | File Templates.
 */

public class Staff {
    private String name;
    private Gender gender;
    private String age;
    private double salary;
    private String address;
    private int contacts;
    private double experience;

    public Staff() {
    }

    public Staff(String name, Gender gender, String age, double salary, String address, int contacts, double experience) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.salary = salary;
        this.address = address;
        this.contacts = contacts;
        this.experience = experience;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Gender getGender() {
        return gender;
    }

    public void setGender(Gender gender) {
        this.gender = gender;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getContacts() {
        return contacts;
    }

    public void setContacts(int contacts) {
        this.contacts = contacts;
    }

    public double getExperience() {
        return experience;
    }

    public void setExperience(double experience) {
        this.experience = experience;
    }

    public final void printGender() {
        System.out.println(gender.name().toLowerCase());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Staff staff = (Staff) o;

        if (age != null ? !age.equals(staff.age) : staff.age != null) return false;
        if (name != null ? !name.equals(staff.name) : staff.name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (age != null ? age.hashCode() : 0);
        return result;
    }

}